package cn.smxy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

@Data
@TableName("comment")
@NoArgsConstructor
@AllArgsConstructor
public class Comment implements Serializable {
    private static final long serialVersionUID = 8511062220398956224L;

    @TableId(type = IdType.ASSIGN_ID, value = "comment_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long commentId;

    private String commentContent;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long plantId;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long parentId;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long rootId;

    private Long createTime;

    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
}
